package top.whk0710.java_study.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvokeHandler implements InvocationHandler{

	private Object obj;
	
	public MyInvokeHandler(Object obj){
		this.obj = obj;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.err.println("------start-------");
		method.invoke(obj, args);
		System.err.println("-------end--------");
		return null;
	}

}

